<div class="container">
    <div class="panel panel-primary"  style="margin-left: 200px;max-width: 700px;min-height: 200px;margin-top: 100px">
        <div class="panel-heading">
            <h3 class="panel-title">CURD代码生成辅助工具 [步骤一]</h3>
        </div>
        <div class="panel-body">
            <form action="" method="get" class="form-horizontal" role="form">
                <div class="form-group">
                    <label for="model-id" class="col-sm-2 control-label">模型英文名</label>
                    <div class="col-sm-10">
                        <input required type="text" name="model-id" class="form-control" id="model-id" placeholder="如 book">
                    </div>
                </div>
                <div class="form-group">
                    <label for="model-name" class="col-sm-2 control-label">模型中文名</label>
                    <div class="col-sm-10">
                        <input required type="text" name="model-name" class="form-control" id="model-name" placeholder="如 图书">
                    </div>
                </div>
                <div class="form-group">
                    <label for="model-db" class="col-sm-2 control-label">数据库配置</label>
                    <div class="col-sm-5">
                        <input required name="model-db" id="model-db" class="form-control" type="text" value="local" placeholder="选择或自定义一个配置项名称">
                    </div>
                    <div class="col-sm-5">
                        <select  id="model-db-sel" class="form-control">
                            {{each $db_sels}}
                            <option value="{{:v}}">{{:v}}</option>
                            {{/}}
                        </select>
                    </div>
                </div>
                <div class="form-group">
                    <label for="model-table-name" class="col-sm-2 control-label">数据表名</label>
                    <div class="col-sm-10">
                        <input type="text" name="model-table-name" class="form-control" id="model-table-name" required
                               placeholder="如 tb_test ，推荐小写字母+下划线组合">
                    </div>
                </div>
                <input type="hidden" value="{{?echo $step+1;}}" name="step">
                <div class="form-group">
                    <div class="col-sm-10 col-sm-offset-2">
                        <button type="submit" class="btn btn-primary">下一步</button>
                    </div>
                </div>
            </form>
        </div>
    </div>
</div>
<script>
    $(function () {
        //数据库配置项选择
        $('#model-db-sel').change(function () {
            $("#model-db").val($(this).val())
        })
    })
</script>